package Dao;

import entity.Account;
import org.apache.ibatis.session.SqlSession;
import tool.MyBatisUtil;

public class AccountDaoImpl implements AccountDao{
    SqlSession sqlSession =null;
    public int getAccount(Account account) {
        int result=-1;
        try {
            sqlSession= MyBatisUtil.getSession();
            result=sqlSession.getMapper(AccountDao.class).getAccount(account);
        } catch (Exception e) {
            e.printStackTrace();
        }finally {
            MyBatisUtil.closeSession();
        }
        return result;
    }
}
